package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.JlExamineApply;

public interface IjlExamineApplyDAO extends CrudRepository<JlExamineApply, Long> {
	//查找所有申请信息
		@Query("select s from JlExamineApply s ")
		public List<JlExamineApply> finExamineApplypage(Pageable pageable);
		@Query("select s from JlExamineApply s where s.eOffice=?1")
		public List<JlExamineApply> finExamineApplypage_byOfficeName(Pageable pageable,String officeName);
		@Query("select s from JlExamineApply s where s.ieId=?1")		
		public List<JlExamineApply> finic_ExamineApplypage(Pageable pageable,BigDecimal Id);
		@Query("select s from JlExamineApply s where s.state=null")
		public List<JlExamineApply> finExamineApplypageing(Pageable pageable);
		//查找最大的编号
		@Query("select  max(eId) from JlExamineApply ")
		public long  maxExamineApply();
		@Query("select s from JlExamineApply s where s.ieId=?1")
		public List<JlExamineApply> icidtoexamineapply(BigDecimal ieId);
		@Query("select s from JlExamineApply s where s.eOffice=?1 ")
		public List<JlExamineApply> pidtoexamineapply(String ieId);
		
}
